Page({
  data:{
    detail:{},
  },
  // onLoad获取页面参数
  onLoad(query){
    // console.log('query',query);
    this.getDetail(query.id)
    this.id = query.id
  },
  async getDetail(id){
    const res = await wx.http.get(`/room/${id}`)
    console.log('res',res);
    this.setData({
      detail:res.data,
    })
  },

  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.id,
    })
  },
})
